package com.business.business.web.web;

import cn.hutool.json.JSONObject;
import com.business.business.common.base.BaseController;
import com.business.business.support.annotaion.Action;
import com.business.business.support.annotaion.At;
import com.business.business.support.model.RespEntity;
import com.business.business.web.service.FirefightingplanService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.annotation.Resource;

@Action
@RequestMapping("/firefightingplan")
public class FirefightingplanController extends BaseController {
    @Resource
    public FirefightingplanService firefightingplanService;

    /**
     * @Author YangYu
     * @Description 楼层分页列表
     * @Date Created in 10:06 2022/7/25
     * @Param [jsonParam]
     */

    @At(value = "storeyListPage", method = RequestMethod.GET, param = { "page","limit"})
    public RespEntity storeyListPage(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingplanService.storeyListPage(jsonParam);
    }

    /**
     * @Author YangYu
     * @Description 楼层新增、编辑
     * @Date Created in 10:06 2022/7/25
     * @Param [jsonParam]
     */
    @At(value = "/storeyAddOrUpdate",method = RequestMethod.POST)
    public RespEntity storeyAddOrUpdate(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingplanService.storeyAddOrUpdate(jsonParam);
    }

    /**
     * @Author YangYu
     * @Description 楼层详情
     * @Date Created in 14:47 2022/7/25
     * @Param [jsonParam]
     */

    @At(value = "storeyDetails", method = RequestMethod.GET, param = { "id"})
    public RespEntity storeyDetails(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingplanService.storeyDetails(jsonParam);
    }

    /**
     * @Author YangYu
     * @Description 楼层删除
     * @Date Created in 14:37 2022/7/25
     * @Param [jsonParam]
     */

    @At(value = "/storeyDel",method = RequestMethod.POST, param = { "id"})
    public RespEntity storeyDel(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingplanService.storeyDel(jsonParam);
    }

    /**
     * @Author YangYu
     * @Description 楼栋分页列表
     * @Date Created in 10:06 2022/7/25
     * @Param [jsonParam]
     */

    @At(value = "floorListPage", method = RequestMethod.GET, param = { "page","limit"})
    public RespEntity floorListPage(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingplanService.floorListPage(jsonParam);
    }

    /**
     * @Author YangYu
     * @Description 楼栋新增、编辑
     * @Date Created in 9:48 2022/7/25
     * @Param [jsonParam]
     */

    @At(value = "/floorAddOrUpdate",method = RequestMethod.POST, param = { "name"})
    public RespEntity floorAddOrUpdate(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingplanService.floorAddOrUpdate(jsonParam);
    }

    /**
     * @Author YangYu
     * @Description 楼栋删除
     * @Date Created in 9:48 2022/7/25
     * @Param [jsonParam]
     */

    @At(value = "/floorDel",method = RequestMethod.POST, param = { "id"})
    public RespEntity floorDel(@RequestBody(required = false) JSONObject jsonParam) {
        return firefightingplanService.floorDel(jsonParam);
    }

    /**
     * @Author YangYu
     * @Description //TODO
     * @Date Created in 9:47 2022/7/25
     * @Param [id, jsonParam]
     */

    @RequestMapping(value = "/firefightingplanDetail/{id}",method = RequestMethod.GET)
    public RespEntity firefightingplanById(@PathVariable("id") String id , @RequestBody(required = false) JSONObject jsonParam){
        RespEntity respEntity = firefightingplanService.firefightingplanById(id ,jsonParam);
        return respEntity ;
    }

    /**
     * @Author LiHaoDong
     * @Description 消防平面图列表
     * @Date 16:56 2020/7/22
     * @Param [jsonParam]
     * @return com.business.business.support.model.RespEntity
     **/
    @RequestMapping(value = "/firefightingplanListPage", method = RequestMethod.GET)
    public RespEntity firefightingplanListPage(@RequestBody(required = false) JSONObject jsonParam) {
        return this.firefightingplanService.firefightingplanListPage(jsonParam);
    }

    /**
     * @Author LiHaoDong
     * @Description 消防平面图详情详情
     * @Date 16:57 2020/7/22
     * @Param [jsonParam]
     * @return com.business.business.support.model.RespEntity
     **/
    @RequestMapping(value = "/firefightingplanDetail", method = RequestMethod.GET)
    public RespEntity firefightingplanDetail(@RequestBody(required = false) JSONObject jsonParam) {
        return this.firefightingplanService.firefightingplanDetail(jsonParam);
    }

    /**
     * @Author LiHaoDong
     * @Description 消防平面图新增
     * @Date 17:16 2020/7/22
     * @Param [jsonParam]
     * @return com.business.business.support.model.RespEntity
     **/
    @RequestMapping(value = "/firefightingplanAdd", method = RequestMethod.POST)
    public RespEntity firefightingplanAdd(@RequestBody(required = false) JSONObject jsonParam) {
        return this.firefightingplanService.firefightingplanAdd(jsonParam);
    }

    /**
     * @Author LiHaoDong
     * @Description 消防平面图修改
     * @Date 17:32 2020/7/22
     * @Param [jsonParam]
     * @return com.business.business.support.model.RespEntity
     **/
    @RequestMapping(value = "/firefightingplanUpdate", method = RequestMethod.POST)
    public RespEntity firefightingplanUpdate(@RequestBody(required = false) JSONObject jsonParam) {
        return this.firefightingplanService.firefightingplanUpdate(jsonParam);
    }

    /**
     * @Author LiHaoDong
     * @Description 消防平面图删除
     * @Date 17:47 2020/7/22
     * @Param
     * @return
     **/
    @RequestMapping(value = "/firefightingplanDelete", method = RequestMethod.POST)
    public RespEntity firefightingplanDelete(@RequestBody(required = false) JSONObject jsonParam) {
        return this.firefightingplanService.firefightingplanDelete(jsonParam);
    }


}
